''' Mission 7 - Personal Billboard Medium Remix 2CC This project uses pitch instead of MP3 files. Otherwise the same as Remix 2C - It includes a button to break the loop and quit - ''' from codex import * from time import sleep choice = 0 my_list1 = [pics.HAPPY, pics.PLANE, pics.TSHIRT, pics.TIARA, pics.HEART, pics.HOUSE] my_list2 = [440, 540, 640, 740, 840, 940, 1040] LAST_INDEX = len(my_list1) - 1 # MAIN PROGRAM while True: my_image = my_list1[choice] my_sound = my_list2[choice] display.show(my_image) audio.pitch(my_sound, 0.5) # sleep is added so tone isn't continuous sleep(0.5) # scroll forward and backward if buttons.was_pressed(BTN_L): choice = choice - 1 if choice < 0: choice = LAST_INDEX if buttons.was_pressed(BTN_R): choice = choice + 1 if choice > LAST_INDEX: choice = 0 # break out of loop and quit if buttons.was_pressed(BTN_D): break